<template>
  <div style="height: 100%">
    <component :is="componentName" @change="(name) => componentName = name" />
  </div>

</template>

<script>
import FarmlandGroup from '../farmland-group'
import FarmlandList from '../farmland-list'
import FarmlandMap from '../farmland-map'

export default {
  name: 'Farmland',
  components: {
    FarmlandGroup,
    FarmlandList,
    FarmlandMap
  },
  data() {
    return {
      rowItem: false,
      componentName: 'FarmlandGroup'
    }
  }
}
</script>

<style scoped lang="scss">
.farmland-page {
  position: relative;
  padding: 20px;
  background-color: #ffffff;
  height: 100%;
  .el-form-item {
    margin-bottom: 22px;
  }
  .border {
    border-top: 1px solid #E8E8E8;
    margin-bottom: 27px;
  }
  .row-list {
    .row-box {
      width: 20%;
      padding: 12px 10px;
      .row-item {
        cursor: pointer;
        width: 100%;
        height: 159px;
        box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
        position: relative;
        border-radius: 14px;
        background-color: #2b2f3a;
        .tag {
          position: absolute;
          left: 11px;
          top: -5px;
          width: 36px;
          height: 16px;
          background: #1AAD23;
          line-height: 16px;
          text-align: center;
          color: #ffffff;
          font-size: 12px;
        }
        .name-wrapper {
          padding: 2px 0 0 11px;
          height: 53px;
          position: absolute;
          left: 0;
          bottom: 0;
          width: 100%;
          background-color: #ffffff;
          border-radius:0 0 14px 14px;
          overflow: hidden;
          .avatar {
            position: absolute;
            width: 35px;
            height: 35px;
            box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
            opacity: 1;
            border: 1px solid #707070;
            border-radius: 50%;
            overflow: hidden;
            top: -12px;
            right: 14px;
            background-color: #ffffff;
            z-index: 999;
          }
          .name {
            font-size: 14px;

            font-weight: 400;
            color: #595959;
            line-height: 22px;
          }
          .desc {
            margin-top: 5px;
            font-size: 12px;

            font-weight: 400;
            color: #595959;
            line-height: 22px;
          }
        }
      }
    }
  }
  .header {
    .title {
      font-size: 16px;

      font-weight: 400;
      color: #222222;
      line-height: 24px;
    }
    .value {
      font-size: 16px;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      font-weight: 400;
      color: #1AAD23;
      line-height: 14px;
      margin-right: 23px;
      font-weight: bold;
    }
  }
}
</style>
